.class public Lcom/estrongs/android/ui/navigation/TabIndicatorView;
.super Landroid/view/View;
.source "TabIndicatorView.java"


# instance fields
.field a:Landroid/graphics/Paint;

.field b:Landroid/graphics/Paint;

.field c:Landroid/graphics/Rect;

.field d:Landroid/graphics/Rect;

.field e:Landroid/graphics/Rect;

.field f:I

.field g:I

.field h:I

.field i:I

.field j:F


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 0

    .line 1
    invoke-direct {p0, p1}, Landroid/view/View;-><init>(Landroid/content/Context;)V

    const/4 p1, -0x1

    .line 2
    iput p1, p0, Lcom/estrongs/android/ui/navigation/TabIndicatorView;->f:I

    iput p1, p0, Lcom/estrongs/android/ui/navigation/TabIndicatorView;->g:I

    const/4 p1, 0x0

    .line 3
    iput p1, p0, Lcom/estrongs/android/ui/navigation/TabIndicatorView;->i:I

    const/4 p1, 0x0

    .line 4
    iput p1, p0, Lcom/estrongs/android/ui/navigation/TabIndicatorView;->j:F

    .line 5
    invoke-direct {p0}, Lcom/estrongs/android/ui/navigation/TabIndicatorView;->a()V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 0

    .line 6
    invoke-direct {p0, p1, p2}, Landroid/view/View;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    const/4 p1, -0x1

    .line 7
    iput p1, p0, Lcom/estrongs/android/ui/navigation/TabIndicatorView;->f:I

    iput p1, p0, Lcom/estrongs/android/ui/navigation/TabIndicatorView;->g:I

    const/4 p1, 0x0

    .line 8
    iput p1, p0, Lcom/estrongs/android/ui/navigation/TabIndicatorView;->i:I

    const/4 p1, 0x0

    .line 9
    iput p1, p0, Lcom/estrongs/android/ui/navigation/TabIndicatorView;->j:F

    .line 10
    invoke-direct {p0}, Lcom/estrongs/android/ui/navigation/TabIndicatorView;->a()V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
    .locals 0

    .line 11
    invoke-direct {p0, p1, p2, p3}, Landroid/view/View;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    const/4 p1, -0x1

    .line 12
    iput p1, p0, Lcom/estrongs/android/ui/navigation/TabIndicatorView;->f:I

    iput p1, p0, Lcom/estrongs/android/ui/navigation/TabIndicatorView;->g:I

    const/4 p1, 0x0

    .line 13
    iput p1, p0, Lcom/estrongs/android/ui/navigation/TabIndicatorView;->i:I

    const/4 p1, 0x0

    .line 14
    iput p1, p0, Lcom/estrongs/android/ui/navigation/TabIndicatorView;->j:F

    .line 15
    invoke-direct {p0}, Lcom/estrongs/android/ui/navigation/TabIndicatorView;->a()V

    return-void
.end method

.method private a()V
    .locals 3

    .line 1
    new-instance v0, Landroid/graphics/Paint;

    invoke-direct {v0}, Landroid/graphics/Paint;-><init>()V

    iput-object v0, p0, Lcom/estrongs/android/ui/navigation/TabIndicatorView;->a:Landroid/graphics/Paint;

    .line 2
    invoke-static {}, Lcom/estrongs/android/ui/theme/b;->r()Lcom/estrongs/android/ui/theme/b;

    move-result-object v1

    const v2, 0x7f06027d

    invoke-virtual {v1, v2}, Lcom/estrongs/android/ui/theme/b;->a(I)I

    move-result v1

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setColor(I)V

    .line 3
    new-instance v0, Landroid/graphics/Paint;

    invoke-direct {v0}, Landroid/graphics/Paint;-><init>()V

    iput-object v0, p0, Lcom/estrongs/android/ui/navigation/TabIndicatorView;->b:Landroid/graphics/Paint;

    .line 4
    invoke-static {}, Lcom/estrongs/android/ui/theme/b;->r()Lcom/estrongs/android/ui/theme/b;

    move-result-object v1

    const v2, 0x7f06027e

    invoke-virtual {v1, v2}, Lcom/estrongs/android/ui/theme/b;->a(I)I

    move-result v1

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setColor(I)V

    return-void
.end method


# virtual methods
.method public a(IF)V
    .locals 0

    .line 5
    :try_start_0
    iput p1, p0, Lcom/estrongs/android/ui/navigation/TabIndicatorView;->i:I

    .line 6
    iput p2, p0, Lcom/estrongs/android/ui/navigation/TabIndicatorView;->j:F

    .line 7
    invoke-virtual {p0}, Landroid/view/View;->invalidate()V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    :catch_0
    return-void
.end method

.method protected onDraw(Landroid/graphics/Canvas;)V
    .locals 5

    .line 1
    invoke-super {p0, p1}, Landroid/view/View;->onDraw(Landroid/graphics/Canvas;)V

    .line 2
    iget-object v0, p0, Lcom/estrongs/android/ui/navigation/TabIndicatorView;->c:Landroid/graphics/Rect;

    if-nez v0, :cond_0

    .line 3
    invoke-virtual {p0}, Landroid/view/View;->getWidth()I

    move-result v0

    iput v0, p0, Lcom/estrongs/android/ui/navigation/TabIndicatorView;->f:I

    .line 4
    invoke-virtual {p0}, Landroid/view/View;->getHeight()I

    move-result v0

    iput v0, p0, Lcom/estrongs/android/ui/navigation/TabIndicatorView;->g:I

    .line 5
    iget v0, p0, Lcom/estrongs/android/ui/navigation/TabIndicatorView;->f:I

    div-int/lit8 v0, v0, 0x2

    iput v0, p0, Lcom/estrongs/android/ui/navigation/TabIndicatorView;->h:I

    .line 6
    new-instance v0, Landroid/graphics/Rect;

    invoke-direct {v0}, Landroid/graphics/Rect;-><init>()V

    iput-object v0, p0, Lcom/estrongs/android/ui/navigation/TabIndicatorView;->c:Landroid/graphics/Rect;

    const/4 v1, 0x0

    .line 7
    iput v1, v0, Landroid/graphics/Rect;->left:I

    .line 8
    iput v1, v0, Landroid/graphics/Rect;->top:I

    .line 9
    iget v2, p0, Lcom/estrongs/android/ui/navigation/TabIndicatorView;->g:I

    iput v2, v0, Landroid/graphics/Rect;->bottom:I

    .line 10
    iget v2, p0, Lcom/estrongs/android/ui/navigation/TabIndicatorView;->h:I

    iput v2, v0, Landroid/graphics/Rect;->right:I

    .line 11
    new-instance v0, Landroid/graphics/Rect;

    invoke-direct {v0}, Landroid/graphics/Rect;-><init>()V

    iput-object v0, p0, Lcom/estrongs/android/ui/navigation/TabIndicatorView;->d:Landroid/graphics/Rect;

    .line 12
    iput v1, v0, Landroid/graphics/Rect;->left:I

    .line 13
    iput v1, v0, Landroid/graphics/Rect;->top:I

    .line 14
    iget v2, p0, Lcom/estrongs/android/ui/navigation/TabIndicatorView;->g:I

    iput v2, v0, Landroid/graphics/Rect;->bottom:I

    .line 15
    iput v1, v0, Landroid/graphics/Rect;->right:I

    .line 16
    invoke-virtual {p0}, Landroid/view/View;->getContext()Landroid/content/Context;

    move-result-object v0

    const/high16 v2, 0x3f800000    # 1.0f

    invoke-static {v0, v2}, Les/fy;->a(Landroid/content/Context;F)I

    move-result v0

    .line 17
    new-instance v2, Landroid/graphics/Rect;

    iget v3, p0, Lcom/estrongs/android/ui/navigation/TabIndicatorView;->g:I

    sub-int v0, v3, v0

    iget v4, p0, Lcom/estrongs/android/ui/navigation/TabIndicatorView;->f:I

    invoke-direct {v2, v1, v0, v4, v3}, Landroid/graphics/Rect;-><init>(IIII)V

    iput-object v2, p0, Lcom/estrongs/android/ui/navigation/TabIndicatorView;->e:Landroid/graphics/Rect;

    .line 18
    :cond_0
    iget v0, p0, Lcom/estrongs/android/ui/navigation/TabIndicatorView;->h:I

    int-to-float v1, v0

    iget v2, p0, Lcom/estrongs/android/ui/navigation/TabIndicatorView;->i:I

    int-to-float v2, v2

    iget v3, p0, Lcom/estrongs/android/ui/navigation/TabIndicatorView;->j:F

    add-float/2addr v2, v3

    mul-float v1, v1, v2

    float-to-int v1, v1

    .line 19
    iget-object v2, p0, Lcom/estrongs/android/ui/navigation/TabIndicatorView;->c:Landroid/graphics/Rect;

    iput v1, v2, Landroid/graphics/Rect;->left:I

    add-int v3, v1, v0

    .line 20
    iput v3, v2, Landroid/graphics/Rect;->right:I

    .line 21
    iget-object v2, p0, Lcom/estrongs/android/ui/navigation/TabIndicatorView;->d:Landroid/graphics/Rect;

    sub-int/2addr v1, v0

    iput v1, v2, Landroid/graphics/Rect;->right:I

    .line 22
    iget-object v0, p0, Lcom/estrongs/android/ui/navigation/TabIndicatorView;->e:Landroid/graphics/Rect;

    iget-object v1, p0, Lcom/estrongs/android/ui/navigation/TabIndicatorView;->a:Landroid/graphics/Paint;

    invoke-virtual {p1, v0, v1}, Landroid/graphics/Canvas;->drawRect(Landroid/graphics/Rect;Landroid/graphics/Paint;)V

    .line 23
    iget-object v0, p0, Lcom/estrongs/android/ui/navigation/TabIndicatorView;->c:Landroid/graphics/Rect;

    iget-object v1, p0, Lcom/estrongs/android/ui/navigation/TabIndicatorView;->b:Landroid/graphics/Paint;

    invoke-virtual {p1, v0, v1}, Landroid/graphics/Canvas;->drawRect(Landroid/graphics/Rect;Landroid/graphics/Paint;)V

    .line 24
    iget-object v0, p0, Lcom/estrongs/android/ui/navigation/TabIndicatorView;->d:Landroid/graphics/Rect;

    iget-object v1, p0, Lcom/estrongs/android/ui/navigation/TabIndicatorView;->b:Landroid/graphics/Paint;

    invoke-virtual {p1, v0, v1}, Landroid/graphics/Canvas;->drawRect(Landroid/graphics/Rect;Landroid/graphics/Paint;)V

    return-void
.end method
